Optimal. Leaf size=47 \[ \frac{1}{2 d (a+i a \tan (c+d x))}+\frac{\log (\sin (c+d x))}{a d}-\frac{i x}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.056771, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3551, 3479, 8, 3475} \[ \frac{1}{2 d (a+i a \tan (c+d x))}+\frac{\log (\sin (c+d x))}{a d}-\frac{i x}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3551
Rule 3479
Rule 8
Rule 3475
Rubi steps
\begin{align*} \int \frac{\cot (c+d x)}{a+i a \tan (c+d x)} \, dx &=-\left (i \int \frac{1}{a+i a \tan (c+d x)} \, dx\right )+\frac{\int \cot (c+d x) \, dx}{a}\\ &=\frac{\log (\sin (c+d x))}{a d}+\frac{1}{2 d (a+i a \tan (c+d x))}-\frac{i \int 1 \, dx}{2 a}\\ &=-\frac{i x}{2 a}+\frac{\log (\sin (c+d x))}{a d}+\frac{1}{2 d (a+i a \tan (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.308633, size = 87, normalized size = 1.85 \[ \frac{\tan ^{-1}(\tan (d x)) (-4-4 i \tan (c+d x))-2 i \log \left (\sin ^2(c+d x)\right )+\tan (c+d x) \left (2 \log \left (\sin ^2(c+d x)\right )+2 i d x-1\right )+2 d x-i}{4 a d (\tan (c+d x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.067, size = 72, normalized size = 1.5 \begin{align*}{\frac{-{\frac{i}{2}}}{ad \left ( \tan \left ( dx+c \right ) -i \right ) }}-{\frac{3\,\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{4\,ad}}-{\frac{\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{4\,ad}}+{\frac{\ln \left ( \tan \left ( dx+c \right ) \right ) }{ad}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.24639, size = 162, normalized size = 3.45 \begin{align*} \frac{{\left (-6 i \, d x e^{\left (2 i \, d x + 2 i \, c\right )} + 4 \, e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right ) + 1\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.635395, size = 92, normalized size = 1.96 \begin{align*} \begin{cases} \frac{e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text{for}\: 4 a d e^{2 i c} \neq 0 \\x \left (- \frac{\left (3 i e^{2 i c} + i\right ) e^{- 2 i c}}{2 a} + \frac{3 i}{2 a}\right ) & \text{otherwise} \end{cases} - \frac{3 i x}{2 a} + \frac{\log{\left (e^{2 i d x} - e^{- 2 i c} \right )}}{a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.29727, size = 99, normalized size = 2.11 \begin{align*} -\frac{\frac{3 \, \log \left (\tan \left (d x + c\right ) - i\right )}{a} + \frac{\log \left (i \, \tan \left (d x + c\right ) - 1\right )}{a} - \frac{4 \, \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a} - \frac{3 \, \tan \left (d x + c\right ) - 5 i}{a{\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]